<!--  -->
<template>
  <div class="desc">
    <div class="hearet">
      <div class="title">{{ Goodsdesc.title }}</div>
    </div>
    <div :style="sliderStyle" class="content" v-html="Goodsdesc.content"></div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      Goodsdesc: []
    };
  },
  //生命周期 - 创建完成（访问当前this实例）
  created() {
    this.getGoodsdesc();
  },
  methods: {
    async getGoodsdesc() {
      const { data: res } = await this.$http.get(
        `/api/goods/getdesc/${this.$route.params.id}`
      );
      console.log(res);
      console.log(this.sliderStyle);

      this.Goodsdesc = res.message[0];
    }
  }
};
</script>
<style lang="less" scoped>
.desc{
  overflow: hidden;
  width: 360px;
}
.hearet {
  height: 80px;
  border-bottom: 2px solid #000;
  margin: 0 8px;
  color: #1989fa;
  .title {
    width: 100%;
    line-height: 80px;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
  }
}
.content {
  margin: 0 15px;
}
img {
  width: 100%;
  height: 100%;
}
</style>
